﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace hoemwork
{
    public class EntityFramework
    {
        //public static IQueryable GetBy(IList<ProblemStatus> exclude, bool hasSummary, bool descByPublishTime)
        //{
        //    SqlDbContext context = new SqlDbContext();
        //    IQueryable query = null;
        //    if (exclude != null)
        //    {
        //        query = context.Problems.Where(q => exclude.Contains(q.Status));
        //    }//else nothing
        //    if (hasSummary)
        //    {
        //        query =
        //              context.Problems
        //              .Where(q => ProblemStatus.HaveReward == q.Status)
        //              .Where(q => ProblemStatus.HadWithdrawn == q.Status)
        //              ;
        //    }
        //    if (descByPublishTime)
        //    {
        //        query =
        //            context.Problems.OrderBy(q => q.PublishDateTime);
        //        return query;
        //    }
        //    query =
        //        context.Problems.OrderByDescending(q => q.PublishDateTime);
        //    return query;
        //}



        //public static IQueryable GetMessage()
        //{
        //    SqlDbContext context = new SqlDbContext();
        //    return context.Messages.OrderBy(q => q.SourceTime).ThenBy(q => q.UnRead);

        //}
    }
}
